Repository navigation
fix(codex): resume account switches without blanking the terminal - #25485
Merged
Merged
Conversation
…e pane Integrate the atomic pane replacement from #24350 and adapt the explicit conversation resume from #14877. Keep terminal protocol replies flowing while account notices block user input. Ordinary restores retain provenance. Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Co-authored-by: itisvincent <vincentcgamer@gmail.com> Co-authored-by: rayim <rayim@fxy.global> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 9 seconds. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (26)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Oct 5, 2026
This was referenced Oct 5, 2026
8 of 9 tasks
Jinwoo-H
added a commit
that referenced
this pull request
Oct 19, 2026
…ad of Codex (#30872) * fix(terminal): Restart on a failed terminal opens a plain shell instead of Codex The exit card's Restart passed a null startup, and a Codex account-restart fallback added in #25485 turned that null into `codex`. Account switches already name their agent explicitly, so the fallback had no legitimate caller. * test(terminal): stub the exit-actions controller without Reflect.get --------- Co-authored-by: E2E Test <e2e@test.local>
This was referenced Oct 24, 2026
This was referenced Nov 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
After switching Codex accounts, Restart could leave an unusable blank terminal or reopen the previous account and ask to restart again. It now replaces the stopped process and resumes the same conversation using the selected account.
What Changed
Why
The daemon correctly rejects attachment to a killed process. Changing general liveness classification hid the stale binding rather than fixing its replacement. #24350's narrower ownership transaction handles concurrent spawns, split panes, and direct SSH. The explicit resume from #14877 prevents stale recovery state from choosing the account or another agent's session.
Credit: @brennanb2025 (Brennan Benson) for #24350, @itisvincent for its credited predecessor #18190, and @tonite31 (Rayim) for #14877's account-selection diagnosis and resume builder. Their contributions are credited in the commit trailers, including #14877's original AI coauthor.
Linked Issue
Related: #20142, #19589. Integrates the replacement fix from #24350 and the conversation/account portions of #14877. This does not supersede all of #14877: its goal-state transfer and account-settings copy changes are outside this patch.
Visual Proof
Before, reproduced blank pane after Restart:
After, same conversation resumed on account B and completed a second prompt:
Testing
pnpm tc, changed-code quality checks, and pre-commit lint pass; 165 focused tests pass across 15 files after rebasing. Electron development build passed. GitHub Actions remained queued across the repository at merge time; there were no required status checks. Remote CI is pending, not claimed green.AI Disclosure
Review
Self-reviewed using the repository-review workflow: ownership fencing, failure cleanup, rollout path validation/no-overwrite behavior, ordinary restores, and local/remote execution boundaries.
Agent skill upstream boundary
Notes
Reliability invariant (
agent-session.provider-ownership): an acknowledged replacement must never reattach the process it stopped, overwrite a successor, or resume the old account merely because it owns the transcript. Oracle: a fresh bound process with the same conversation and selected account; failure tests require successor preservation and recoverable remount. Focused tests are the experimental evidence for this change; no manifest promotion is claimed.Coverage: local/daemon macOS rendered; split panes, direct SSH ownership and paired-runtime behavior tested with deterministic fixtures. Live Linux, Windows, WSL, SSH, and mobile are untested. WSL retains its existing fresh-relaunch fallback; paired-runtime restarts retain their existing host-owned behavior. No wire protocol changes. Folder paths remain supported. There is no new polling or process inventory scan; rollout preparation targets one verified file. Failure diagnostics use existing spawn errors plus a stopped-binding cleanup warning.
Residual gap: cross-account
/goalstate transfer is not included or claimed. The conversation rollout is preserved, but Codex also owns goal state in a separate database. Source inspection used the local~/projects/codexcheckout.Checklist